const connect = require('connect');
const errorhandler = require('errorhandler');
const morgan = require('morgan');

connect()
  .use(morgan('dev'))
  .use(function (req, res, next) {
    setTimeout(function () {
      next(new Error('something broke!'));
    }, 500);
  })
  .use(errorhandler())
  .listen(3000);
